<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cairo_t</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
<link rel="up" href="cairo-drawing.html" title="Drawing">
<link rel="prev" href="cairo-drawing.html" title="Drawing">
<link rel="next" href="cairo-Paths.html" title="Paths">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="cairo-drawing.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="cairo-drawing.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
<td><a accesskey="n" href="cairo-Paths.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#cairo-cairo-t.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#cairo-cairo-t.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="cairo_t">
<a name="cairo-cairo-t"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cairo-cairo-t.top_of_page"></a>cairo_t</span></h2>
<p>cairo_t — The cairo drawing context</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="cairo-cairo-t.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">typedef             <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t">cairo_t</a>;
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="returnvalue">cairo_t</span></a> *           <a class="link" href="cairo-cairo-t.html#cairo-create" title="cairo_create ()">cairo_create</a>                        (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *target</code></em>);
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="returnvalue">cairo_t</span></a> *           <a class="link" href="cairo-cairo-t.html#cairo-reference" title="cairo_reference ()">cairo_reference</a>                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()">cairo_destroy</a>                       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>      <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()">cairo_status</a>                        (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()">cairo_save</a>                          (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()">cairo_restore</a>                       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *   <a class="link" href="cairo-cairo-t.html#cairo-get-target" title="cairo_get_target ()">cairo_get_target</a>                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()">cairo_push_group</a>                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()">cairo_push_group_with_content</a>       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> content</code></em>);
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> *   <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()">cairo_pop_group</a>                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-pop-group-to-source" title="cairo_pop_group_to_source ()">cairo_pop_group_to_source</a>           (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *   <a class="link" href="cairo-cairo-t.html#cairo-get-group-target" title="cairo_get_group_target ()">cairo_get_group_target</a>              (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb" title="cairo_set_source_rgb ()">cairo_set_source_rgb</a>                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> red</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> green</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> blue</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgba" title="cairo_set_source_rgba ()">cairo_set_source_rgba</a>               (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> red</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> green</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> blue</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> alpha</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-source" title="cairo_set_source ()">cairo_set_source</a>                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *source</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-source-surface" title="cairo_set_source_surface ()">cairo_set_source_surface</a>            (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y</code></em>);
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> *   <a class="link" href="cairo-cairo-t.html#cairo-get-source" title="cairo_get_source ()">cairo_get_source</a>                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
enum                <a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a>;
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-antialias" title="cairo_set_antialias ()">cairo_set_antialias</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t"><span class="type">cairo_antialias_t</span></a> antialias</code></em>);
<a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t"><span class="returnvalue">cairo_antialias_t</span></a>   <a class="link" href="cairo-cairo-t.html#cairo-get-antialias" title="cairo_get_antialias ()">cairo_get_antialias</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()">cairo_set_dash</a>                      (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code>const <span class="type">double</span> *dashes</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> num_dashes</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> offset</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="cairo-cairo-t.html#cairo-get-dash-count" title="cairo_get_dash_count ()">cairo_get_dash_count</a>                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-get-dash" title="cairo_get_dash ()">cairo_get_dash</a>                      (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *dashes</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *offset</code></em>);
enum                <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t">cairo_fill_rule_t</a>;
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()">cairo_set_fill_rule</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> fill_rule</code></em>);
<a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="returnvalue">cairo_fill_rule_t</span></a>   <a class="link" href="cairo-cairo-t.html#cairo-get-fill-rule" title="cairo_get_fill_rule ()">cairo_get_fill_rule</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
enum                <a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t">cairo_line_cap_t</a>;
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()">cairo_set_line_cap</a>                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="type">cairo_line_cap_t</span></a> line_cap</code></em>);
<a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="returnvalue">cairo_line_cap_t</span></a>    <a class="link" href="cairo-cairo-t.html#cairo-get-line-cap" title="cairo_get_line_cap ()">cairo_get_line_cap</a>                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
enum                <a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t">cairo_line_join_t</a>;
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()">cairo_set_line_join</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="type">cairo_line_join_t</span></a> line_join</code></em>);
<a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="returnvalue">cairo_line_join_t</span></a>   <a class="link" href="cairo-cairo-t.html#cairo-get-line-join" title="cairo_get_line_join ()">cairo_get_line_join</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()">cairo_set_line_width</a>                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> width</code></em>);
<span class="returnvalue">double</span>              <a class="link" href="cairo-cairo-t.html#cairo-get-line-width" title="cairo_get_line_width ()">cairo_get_line_width</a>                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit" title="cairo_set_miter_limit ()">cairo_set_miter_limit</a>               (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> limit</code></em>);
<span class="returnvalue">double</span>              <a class="link" href="cairo-cairo-t.html#cairo-get-miter-limit" title="cairo_get_miter_limit ()">cairo_get_miter_limit</a>               (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
enum                <a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t">cairo_operator_t</a>;
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-operator" title="cairo_set_operator ()">cairo_set_operator</a>                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> op</code></em>);
<a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="returnvalue">cairo_operator_t</span></a>    <a class="link" href="cairo-cairo-t.html#cairo-get-operator" title="cairo_get_operator ()">cairo_get_operator</a>                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-set-tolerance" title="cairo_set_tolerance ()">cairo_set_tolerance</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> tolerance</code></em>);
<span class="returnvalue">double</span>              <a class="link" href="cairo-cairo-t.html#cairo-get-tolerance" title="cairo_get_tolerance ()">cairo_get_tolerance</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()">cairo_clip</a>                          (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()">cairo_clip_preserve</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-clip-extents" title="cairo_clip_extents ()">cairo_clip_extents</a>                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x2</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y2</code></em>);
<a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a>        <a class="link" href="cairo-cairo-t.html#cairo-in-clip" title="cairo_in_clip ()">cairo_in_clip</a>                       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-reset-clip" title="cairo_reset_clip ()">cairo_reset_clip</a>                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
                    <a class="link" href="cairo-cairo-t.html#cairo-rectangle-t" title="cairo_rectangle_t">cairo_rectangle_t</a>;
                    <a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t">cairo_rectangle_list_t</a>;
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-destroy" title="cairo_rectangle_list_destroy ()">cairo_rectangle_list_destroy</a>        (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t"><span class="type">cairo_rectangle_list_t</span></a> *rectangle_list</code></em>);
<a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t"><span class="returnvalue">cairo_rectangle_list_t</span></a> * <a class="link" href="cairo-cairo-t.html#cairo-copy-clip-rectangle-list" title="cairo_copy_clip_rectangle_list ()">cairo_copy_clip_rectangle_list</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()">cairo_fill</a>                          (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()">cairo_fill_preserve</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-fill-extents" title="cairo_fill_extents ()">cairo_fill_extents</a>                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x2</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y2</code></em>);
<a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a>        <a class="link" href="cairo-cairo-t.html#cairo-in-fill" title="cairo_in_fill ()">cairo_in_fill</a>                       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-mask" title="cairo_mask ()">cairo_mask</a>                          (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-mask-surface" title="cairo_mask_surface ()">cairo_mask_surface</a>                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> surface_x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> surface_y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-paint" title="cairo_paint ()">cairo_paint</a>                         (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-paint-with-alpha" title="cairo_paint_with_alpha ()">cairo_paint_with_alpha</a>              (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> alpha</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()">cairo_stroke</a>                        (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()">cairo_stroke_preserve</a>               (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()">cairo_stroke_extents</a>                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x2</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y2</code></em>);
<a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a>        <a class="link" href="cairo-cairo-t.html#cairo-in-stroke" title="cairo_in_stroke ()">cairo_in_stroke</a>                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-copy-page" title="cairo_copy_page ()">cairo_copy_page</a>                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cairo-cairo-t.html#cairo-show-page" title="cairo_show_page ()">cairo_show_page</a>                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
unsigned <span class="returnvalue">int</span>        <a class="link" href="cairo-cairo-t.html#cairo-get-reference-count" title="cairo_get_reference_count ()">cairo_get_reference_count</a>           (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>      <a class="link" href="cairo-cairo-t.html#cairo-set-user-data" title="cairo_set_user_data ()">cairo_set_user_data</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> destroy</code></em>);
<span class="returnvalue">void</span> *              <a class="link" href="cairo-cairo-t.html#cairo-get-user-data" title="cairo_get_user_data ()">cairo_get_user_data</a>                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="cairo-cairo-t.description"></a><h2>Description</h2>
<p>
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is the main object used when drawing with cairo. To
draw with cairo, you create a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, set the target surface,
and drawing options for the <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, create shapes with
functions like <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a> and <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>, and then
draw shapes with <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>.
</p>
<p>
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>'s can be pushed to a stack via <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>.
They may then safely be changed, without loosing the current state.
Use <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> to restore to the saved state.
</p>
</div>
<div class="refsect1" title="Details">
<a name="cairo-cairo-t.details"></a><h2>Details</h2>
<div class="refsect2" title="cairo_t">
<a name="cairo-t"></a><h3>cairo_t</h3>
<pre class="programlisting">typedef struct _cairo cairo_t;
</pre>
<p>
A <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> contains the current state of the rendering device,
including coordinates of yet to be drawn shapes.
</p>
<p>
Cairo contexts, as <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> objects are named, are central to
cairo and all drawing with cairo is always done to a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
object.
</p>
<p>
Memory management of <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is done with
<a class="link" href="cairo-cairo-t.html#cairo-reference" title="cairo_reference ()"><code class="function">cairo_reference()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a>.
</p>
</div>
<hr>
<div class="refsect2" title="cairo_create ()">
<a name="cairo-create"></a><h3>cairo_create ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="returnvalue">cairo_t</span></a> *           cairo_create                        (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *target</code></em>);</pre>
<p>
Creates a new <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> with all graphics state parameters set to
default values and with <em class="parameter"><code>target</code></em> as a target surface. The target
surface should be constructed with a backend-specific function such
as <a class="link" href="cairo-Image-Surfaces.html#cairo-image-surface-create" title="cairo_image_surface_create ()"><code class="function">cairo_image_surface_create()</code></a> (or any other
cairo_<span class="emphasis"><em>backend</em></span><code class="function">_surface_create()</code> variant).
</p>
<p>
This function references <em class="parameter"><code>target</code></em>, so you can immediately
call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> on it if you don't need to
maintain a separate reference to it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>target surface for the context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> with a reference
 count of 1. The initial reference count should be released
 with <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a> when you are done using the <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.
 This function never returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If memory cannot be
 allocated, a special <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> object will be returned on
 which <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a> returns <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.
 You can use this object normally, but no drawing will
 be done.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_reference ()">
<a name="cairo-reference"></a><h3>cairo_reference ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="returnvalue">cairo_t</span></a> *           cairo_reference                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Increases the reference count on <em class="parameter"><code>cr</code></em> by one. This prevents
<em class="parameter"><code>cr</code></em> from being destroyed until a matching call to <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a>
is made.
</p>
<p>
The number of references to a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> can be get using
<a class="link" href="cairo-cairo-t.html#cairo-get-reference-count" title="cairo_get_reference_count ()"><code class="function">cairo_get_reference_count()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the referenced <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_destroy ()">
<a name="cairo-destroy"></a><h3>cairo_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_destroy                       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Decreases the reference count on <em class="parameter"><code>cr</code></em> by one. If the result
is zero, then <em class="parameter"><code>cr</code></em> and all associated resources are freed.
See <a class="link" href="cairo-cairo-t.html#cairo-reference" title="cairo_reference ()"><code class="function">cairo_reference()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_status ()">
<a name="cairo-status"></a><h3>cairo_status ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>      cairo_status                        (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Checks whether an error has previously occurred for this context.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current status of this context, see <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_save ()">
<a name="cairo-save"></a><h3>cairo_save ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_save                          (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Makes a copy of the current state of <em class="parameter"><code>cr</code></em> and saves it
on an internal stack of saved states for <em class="parameter"><code>cr</code></em>. When
<a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> is called, <em class="parameter"><code>cr</code></em> will be restored to
the saved state. Multiple calls to <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> and
<a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> can be nested; each call to <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>
restores the state from the matching paired <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>.
</p>
<p>
It isn't necessary to clear all saved states before
a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is freed. If the reference count of a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
drops to zero in response to a call to <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a>,
any saved states will be freed along with the <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_restore ()">
<a name="cairo-restore"></a><h3>cairo_restore ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_restore                       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Restores <em class="parameter"><code>cr</code></em> to the state saved by a preceding call to
<a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> and removes that state from the stack of
saved states.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_target ()">
<a name="cairo-get-target"></a><h3>cairo_get_target ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *   cairo_get_target                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the target surface for the cairo context as passed to
<a class="link" href="cairo-cairo-t.html#cairo-create" title="cairo_create ()"><code class="function">cairo_create()</code></a>.
</p>
<p>
This function will always return a valid pointer, but the result
can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state,
(ie. <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>).
A nil surface is indicated by <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a>
<code class="literal">!=</code> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the target surface. This object is owned by cairo. To
keep a reference to it, you must call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference" title="cairo_surface_reference ()"><code class="function">cairo_surface_reference()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_push_group ()">
<a name="cairo-push-group"></a><h3>cairo_push_group ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_push_group                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Temporarily redirects drawing to an intermediate surface known as a
group. The redirection lasts until the group is completed by a call
to <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-pop-group-to-source" title="cairo_pop_group_to_source ()"><code class="function">cairo_pop_group_to_source()</code></a>. These calls
provide the result of any drawing to the group as a pattern,
(either as an explicit object, or set as the source pattern).
</p>
<p>
This group functionality can be convenient for performing
intermediate compositing. One common use of a group is to render
objects as opaque within the group, (so that they occlude each
other), and then blend the result with translucence onto the
destination.
</p>
<p>
Groups can be nested arbitrarily deep by making balanced calls to
<a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a>/<a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a>. Each call pushes/pops the new
target group onto/from a stack.
</p>
<p>
The <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> function calls <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> so that any
changes to the graphics state will not be visible outside the
group, (the pop_group functions call <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>).
</p>
<p>
By default the intermediate group will have a content type of
<a class="link" href="cairo-cairo-surface-t.html#CAIRO-CONTENT-COLOR-ALPHA:CAPS"><code class="literal">CAIRO_CONTENT_COLOR_ALPHA</code></a>. Other content types can be chosen for
the group by using <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a> instead.
</p>
<p>
As an example, here is how one might fill and stroke a path with
translucence, but without any portion of the fill being visible
under the stroke:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
cairo_push_group (cr);
cairo_set_source (cr, fill_pattern);
cairo_fill_preserve (cr);
cairo_set_source (cr, stroke_pattern);
cairo_stroke (cr);
cairo_pop_group_to_source (cr);
cairo_paint_with_alpha (cr, alpha);
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" title="cairo_push_group_with_content ()">
<a name="cairo-push-group-with-content"></a><h3>cairo_push_group_with_content ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_push_group_with_content       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> content</code></em>);</pre>
<p>
Temporarily redirects drawing to an intermediate surface known as a
group. The redirection lasts until the group is completed by a call
to <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-pop-group-to-source" title="cairo_pop_group_to_source ()"><code class="function">cairo_pop_group_to_source()</code></a>. These calls
provide the result of any drawing to the group as a pattern,
(either as an explicit object, or set as the source pattern).
</p>
<p>
The group will have a content type of <em class="parameter"><code>content</code></em>. The ability to
control this content type is the only distinction between this
function and <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> which you should see for a more
detailed description of group rendering.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>content</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> indicating the type of group that
          will be created
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" title="cairo_pop_group ()">
<a name="cairo-pop-group"></a><h3>cairo_pop_group ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> *   cairo_pop_group                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Terminates the redirection begun by a call to <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> or
<a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a> and returns a new pattern
containing the results of all drawing operations performed to the
group.
</p>
<p>
The <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> function calls <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>, (balancing a
call to <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> by the push_group function), so that any
changes to the graphics state will not be visible outside the
group.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly created (surface) pattern containing the
results of all drawing operations performed to the group. The
caller owns the returned object and should call
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when finished with it.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" title="cairo_pop_group_to_source ()">
<a name="cairo-pop-group-to-source"></a><h3>cairo_pop_group_to_source ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_pop_group_to_source           (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Terminates the redirection begun by a call to <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> or
<a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a> and installs the resulting pattern
as the source pattern in the given cairo context.
</p>
<p>
The behavior of this function is equivalent to the sequence of
operations:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a> *group = cairo_pop_group (cr);
cairo_set_source (cr, group);
cairo_pattern_destroy (group);
</pre></div>
<p>
</p>
<p>
but is more convenient as their is no need for a variable to store
the short-lived pointer to the pattern.
</p>
<p>
The <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> function calls <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>, (balancing a
call to <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> by the push_group function), so that any
changes to the graphics state will not be visible outside the
group.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" title="cairo_get_group_target ()">
<a name="cairo-get-group-target"></a><h3>cairo_get_group_target ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *   cairo_get_group_target              (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current destination surface for the context. This is either
the original target surface as passed to <a class="link" href="cairo-cairo-t.html#cairo-create" title="cairo_create ()"><code class="function">cairo_create()</code></a> or the target
surface for the current group as started by the most recent call to
<a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a>.
</p>
<p>
This function will always return a valid pointer, but the result
can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state,
(ie. <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>).
A nil surface is indicated by <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a>
<code class="literal">!=</code> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the target surface. This object is owned by cairo. To
keep a reference to it, you must call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference" title="cairo_surface_reference ()"><code class="function">cairo_surface_reference()</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2" title="cairo_set_source_rgb ()">
<a name="cairo-set-source-rgb"></a><h3>cairo_set_source_rgb ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_source_rgb                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> red</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> green</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> blue</code></em>);</pre>
<p>
Sets the source pattern within <em class="parameter"><code>cr</code></em> to an opaque color. This opaque
color will then be used for any subsequent drawing operation until
a new source pattern is set.
</p>
<p>
The color components are floating point numbers in the range 0 to
1. If the values passed in are outside that range, they will be
clamped.
</p>
<p>
The default source pattern is opaque black, (that is, it is
equivalent to cairo_set_source_rgb(cr, 0.0, 0.0, 0.0)).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
<td>red component of color
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
<td>green component of color
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
<td>blue component of color
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_source_rgba ()">
<a name="cairo-set-source-rgba"></a><h3>cairo_set_source_rgba ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_source_rgba               (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> red</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> green</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> blue</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> alpha</code></em>);</pre>
<p>
Sets the source pattern within <em class="parameter"><code>cr</code></em> to a translucent color. This
color will then be used for any subsequent drawing operation until
a new source pattern is set.
</p>
<p>
The color and alpha components are floating point numbers in the
range 0 to 1. If the values passed in are outside that range, they
will be clamped.
</p>
<p>
The default source pattern is opaque black, (that is, it is
equivalent to cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0)).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
<td>red component of color
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
<td>green component of color
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
<td>blue component of color
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
<td>alpha component of color
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_source ()">
<a name="cairo-set-source"></a><h3>cairo_set_source ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_source                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *source</code></em>);</pre>
<p>
Sets the source pattern within <em class="parameter"><code>cr</code></em> to <em class="parameter"><code>source</code></em>. This pattern
will then be used for any subsequent drawing operation until a new
source pattern is set.
</p>
<p>
Note: The pattern's transformation matrix will be locked to the
user space in effect at the time of <a class="link" href="cairo-cairo-t.html#cairo-set-source" title="cairo_set_source ()"><code class="function">cairo_set_source()</code></a>. This means
that further modifications of the current transformation matrix
will not affect the source pattern. See <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-matrix" title="cairo_pattern_set_matrix ()"><code class="function">cairo_pattern_set_matrix()</code></a>.
</p>
<p>
The default source pattern is a solid pattern that is opaque black,
(that is, it is equivalent to cairo_set_source_rgb(cr, 0.0, 0.0,
0.0)).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> to be used as the source for
subsequent drawing operations.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_source_surface ()">
<a name="cairo-set-source-surface"></a><h3>cairo_set_source_surface ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_source_surface            (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
<p>
This is a convenience function for creating a pattern from <em class="parameter"><code>surface</code></em>
and setting it as the source in <em class="parameter"><code>cr</code></em> with <a class="link" href="cairo-cairo-t.html#cairo-set-source" title="cairo_set_source ()"><code class="function">cairo_set_source()</code></a>.
</p>
<p>
The <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> parameters give the user-space coordinate at which
the surface origin should appear. (The surface origin is its
upper-left corner before any transformation has been applied.) The
<em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> parameters are negated and then set as translation values
in the pattern matrix.
</p>
<p>
Other than the initial translation pattern matrix, as described
above, all other pattern attributes, (such as its extend mode), are
set to the default values as in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-for-surface" title="cairo_pattern_create_for_surface ()"><code class="function">cairo_pattern_create_for_surface()</code></a>.
The resulting pattern can be queried with <a class="link" href="cairo-cairo-t.html#cairo-get-source" title="cairo_get_source ()"><code class="function">cairo_get_source()</code></a> so
that these attributes can be modified if desired, (eg. to create a
repeating pattern with <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-extend" title="cairo_pattern_set_extend ()"><code class="function">cairo_pattern_set_extend()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
<td>a surface to be used to set the source pattern
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>User-space X coordinate for surface origin
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>User-space Y coordinate for surface origin
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_source ()">
<a name="cairo-get-source"></a><h3>cairo_get_source ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> *   cairo_get_source                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current source pattern for <em class="parameter"><code>cr</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current source pattern. This object is owned by
cairo. To keep a reference to it, you must call
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-reference" title="cairo_pattern_reference ()"><code class="function">cairo_pattern_reference()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum cairo_antialias_t">
<a name="cairo-antialias-t"></a><h3>enum cairo_antialias_t</h3>
<pre class="programlisting">typedef enum _cairo_antialias {
    CAIRO_ANTIALIAS_DEFAULT,
    CAIRO_ANTIALIAS_NONE,
    CAIRO_ANTIALIAS_GRAY,
    CAIRO_ANTIALIAS_SUBPIXEL
} cairo_antialias_t;
</pre>
<p>
Specifies the type of antialiasing to do when rendering text or shapes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="CAIRO-ANTIALIAS-DEFAULT:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_DEFAULT</code></span></p></td>
<td>Use the default antialiasing for
  the subsystem and target device
</td>
</tr>
<tr>
<td><p><a name="CAIRO-ANTIALIAS-NONE:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_NONE</code></span></p></td>
<td>Use a bilevel alpha mask
</td>
</tr>
<tr>
<td><p><a name="CAIRO-ANTIALIAS-GRAY:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_GRAY</code></span></p></td>
<td>Perform single-color antialiasing (using
 shades of gray for black text on a white background, for example).
</td>
</tr>
<tr>
<td><p><a name="CAIRO-ANTIALIAS-SUBPIXEL:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></span></p></td>
<td>Perform antialiasing by taking
 advantage of the order of subpixel elements on devices
 such as LCD panels
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_antialias ()">
<a name="cairo-set-antialias"></a><h3>cairo_set_antialias ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_antialias                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t"><span class="type">cairo_antialias_t</span></a> antialias</code></em>);</pre>
<p>
Set the antialiasing mode of the rasterizer used for drawing shapes.
This value is a hint, and a particular backend may or may not support
a particular value.  At the current time, no backend supports
<a class="link" href="cairo-cairo-t.html#CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></a> when drawing shapes.
</p>
<p>
Note that this option does not affect text rendering, instead see
<a class="link" href="cairo-cairo-font-options-t.html#cairo-font-options-set-antialias" title="cairo_font_options_set_antialias ()"><code class="function">cairo_font_options_set_antialias()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>antialias</code></em> :</span></p></td>
<td>the new antialiasing mode
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_antialias ()">
<a name="cairo-get-antialias"></a><h3>cairo_get_antialias ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t"><span class="returnvalue">cairo_antialias_t</span></a>   cairo_get_antialias                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current shape antialiasing mode, as set by <code class="function">cairo_set_shape_antialias()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current shape antialiasing mode.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_dash ()">
<a name="cairo-set-dash"></a><h3>cairo_set_dash ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_dash                      (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code>const <span class="type">double</span> *dashes</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> num_dashes</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> offset</code></em>);</pre>
<p>
Sets the dash pattern to be used by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>. A dash pattern
is specified by <em class="parameter"><code>dashes</code></em>, an array of positive values. Each value
provides the length of alternate "on" and "off" portions of the
stroke. The <em class="parameter"><code>offset</code></em> specifies an offset into the pattern at which
the stroke begins.
</p>
<p>
Each "on" segment will have caps applied as if the segment were a
separate sub-path. In particular, it is valid to use an "on" length
of 0.0 with <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> or <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> in order
to distributed dots or squares along a path.
</p>
<p>
Note: The length values are in user-space units as evaluated at the
time of stroking. This is not necessarily the same as the user
space at the time of <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>.
</p>
<p>
If <em class="parameter"><code>num_dashes</code></em> is 0 dashing is disabled.
</p>
<p>
If <em class="parameter"><code>num_dashes</code></em> is 1 a symmetric pattern is assumed with alternating
on and off portions of the size specified by the single value in
<em class="parameter"><code>dashes</code></em>.
</p>
<p>
If any value in <em class="parameter"><code>dashes</code></em> is negative, or if all values are 0, then
<em class="parameter"><code>cr</code></em> will be put into an error state with a status of
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-DASH:CAPS"><code class="literal">CAIRO_STATUS_INVALID_DASH</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dashes</code></em> :</span></p></td>
<td>an array specifying alternate lengths of on and off stroke portions
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_dashes</code></em> :</span></p></td>
<td>the length of the dashes array
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>an offset into the dash pattern at which the stroke should start
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_dash_count ()">
<a name="cairo-get-dash-count"></a><h3>cairo_get_dash_count ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 cairo_get_dash_count                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
This function returns the length of the dash array in <em class="parameter"><code>cr</code></em> (0 if dashing
is not currently in effect).
</p>
<p>
See also <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-get-dash" title="cairo_get_dash ()"><code class="function">cairo_get_dash()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the length of the dash array, or 0 if no dash array set.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" title="cairo_get_dash ()">
<a name="cairo-get-dash"></a><h3>cairo_get_dash ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_get_dash                      (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *dashes</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *offset</code></em>);</pre>
<p>
Gets the current dash array.  If not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <em class="parameter"><code>dashes</code></em> should be big
enough to hold at least the number of values returned by
<a class="link" href="cairo-cairo-t.html#cairo-get-dash-count" title="cairo_get_dash_count ()"><code class="function">cairo_get_dash_count()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dashes</code></em> :</span></p></td>
<td>return value for the dash array, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>return value for the current dash offset, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" title="enum cairo_fill_rule_t">
<a name="cairo-fill-rule-t"></a><h3>enum cairo_fill_rule_t</h3>
<pre class="programlisting">typedef enum _cairo_fill_rule {
    CAIRO_FILL_RULE_WINDING,
    CAIRO_FILL_RULE_EVEN_ODD
} cairo_fill_rule_t;
</pre>
<p>
<a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> is used to select how paths are filled. For both
fill rules, whether or not a point is included in the fill is
determined by taking a ray from that point to infinity and looking
at intersections with the path. The ray can be in any direction,
as long as it doesn't pass through the end point of a segment
or have a tricky intersection such as intersecting tangent to the path.
(Note that filling is not actually implemented in this way. This
is just a description of the rule that is applied.)
</p>
<p>
The default fill rule is <a class="link" href="cairo-cairo-t.html#CAIRO-FILL-RULE-WINDING:CAPS"><code class="literal">CAIRO_FILL_RULE_WINDING</code></a>.
</p>
<p>
New entries may be added in future versions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="CAIRO-FILL-RULE-WINDING:CAPS"></a><span class="term"><code class="literal">CAIRO_FILL_RULE_WINDING</code></span></p></td>
<td>If the path crosses the ray from
left-to-right, counts +1. If the path crosses the ray
from right to left, counts -1. (Left and right are determined
from the perspective of looking along the ray from the starting
point.) If the total count is non-zero, the point will be filled.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-FILL-RULE-EVEN-ODD:CAPS"></a><span class="term"><code class="literal">CAIRO_FILL_RULE_EVEN_ODD</code></span></p></td>
<td>Counts the total number of
intersections, without regard to the orientation of the contour. If
the total number of intersections is odd, the point will be
filled.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_fill_rule ()">
<a name="cairo-set-fill-rule"></a><h3>cairo_set_fill_rule ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_fill_rule                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> fill_rule</code></em>);</pre>
<p>
Set the current fill rule within the cairo context. The fill rule
is used to determine which regions are inside or outside a complex
(potentially self-intersecting) path. The current fill rule affects
both <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>. See <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> for details
on the semantics of each available fill rule.
</p>
<p>
The default fill rule is <a class="link" href="cairo-cairo-t.html#CAIRO-FILL-RULE-WINDING:CAPS"><code class="literal">CAIRO_FILL_RULE_WINDING</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fill_rule</code></em> :</span></p></td>
<td>a fill rule, specified as a <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_fill_rule ()">
<a name="cairo-get-fill-rule"></a><h3>cairo_get_fill_rule ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="returnvalue">cairo_fill_rule_t</span></a>   cairo_get_fill_rule                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current fill rule, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current fill rule.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum cairo_line_cap_t">
<a name="cairo-line-cap-t"></a><h3>enum cairo_line_cap_t</h3>
<pre class="programlisting">typedef enum _cairo_line_cap {
    CAIRO_LINE_CAP_BUTT,
    CAIRO_LINE_CAP_ROUND,
    CAIRO_LINE_CAP_SQUARE
} cairo_line_cap_t;
</pre>
<p>
Specifies how to render the endpoints of the path when stroking.
</p>
<p>
The default line cap style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="CAIRO-LINE-CAP-BUTT:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_CAP_BUTT</code></span></p></td>
<td>start(stop) the line exactly at the start(end) point
</td>
</tr>
<tr>
<td><p><a name="CAIRO-LINE-CAP-ROUND:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_CAP_ROUND</code></span></p></td>
<td>use a round ending, the center of the circle is the end point
</td>
</tr>
<tr>
<td><p><a name="CAIRO-LINE-CAP-SQUARE:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></span></p></td>
<td>use squared ending, the center of the square is the end point
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_line_cap ()">
<a name="cairo-set-line-cap"></a><h3>cairo_set_line_cap ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_line_cap                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="type">cairo_line_cap_t</span></a> line_cap</code></em>);</pre>
<p>
Sets the current line cap style within the cairo context. See
<a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="type">cairo_line_cap_t</span></a> for details about how the available line cap
styles are drawn.
</p>
<p>
As with the other stroke parameters, the current line cap style is
examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
construction.
</p>
<p>
The default line cap style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>line_cap</code></em> :</span></p></td>
<td>a line cap style
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_line_cap ()">
<a name="cairo-get-line-cap"></a><h3>cairo_get_line_cap ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="returnvalue">cairo_line_cap_t</span></a>    cairo_get_line_cap                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current line cap style, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current line cap style.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum cairo_line_join_t">
<a name="cairo-line-join-t"></a><h3>enum cairo_line_join_t</h3>
<pre class="programlisting">typedef enum _cairo_line_join {
    CAIRO_LINE_JOIN_MITER,
    CAIRO_LINE_JOIN_ROUND,
    CAIRO_LINE_JOIN_BEVEL
} cairo_line_join_t;
</pre>
<p>
Specifies how to render the junction of two lines when stroking.
</p>
<p>
The default line join style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="CAIRO-LINE-JOIN-MITER:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_JOIN_MITER</code></span></p></td>
<td>use a sharp (angled) corner, see
<a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit" title="cairo_set_miter_limit ()"><code class="function">cairo_set_miter_limit()</code></a>
</td>
</tr>
<tr>
<td><p><a name="CAIRO-LINE-JOIN-ROUND:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_JOIN_ROUND</code></span></p></td>
<td>use a rounded join, the center of the circle is the
joint point
</td>
</tr>
<tr>
<td><p><a name="CAIRO-LINE-JOIN-BEVEL:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_JOIN_BEVEL</code></span></p></td>
<td>use a cut-off join, the join is cut off at half
the line width from the joint point
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_line_join ()">
<a name="cairo-set-line-join"></a><h3>cairo_set_line_join ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_line_join                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="type">cairo_line_join_t</span></a> line_join</code></em>);</pre>
<p>
Sets the current line join style within the cairo context. See
<a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="type">cairo_line_join_t</span></a> for details about how the available line join
styles are drawn.
</p>
<p>
As with the other stroke parameters, the current line join style is
examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
construction.
</p>
<p>
The default line join style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>line_join</code></em> :</span></p></td>
<td>a line join style
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_line_join ()">
<a name="cairo-get-line-join"></a><h3>cairo_get_line_join ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="returnvalue">cairo_line_join_t</span></a>   cairo_get_line_join                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current line join style, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current line join style.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_line_width ()">
<a name="cairo-set-line-width"></a><h3>cairo_set_line_width ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_line_width                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> width</code></em>);</pre>
<p>
Sets the current line width within the cairo context. The line
width value specifies the diameter of a pen that is circular in
user space, (though device-space pen may be an ellipse in general
due to scaling/shear/rotation of the CTM).
</p>
<p>
Note: When the description above refers to user space and CTM it
refers to the user space and CTM in effect at the time of the
stroking operation, not the user space and CTM in effect at the
time of the call to <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>. The simplest usage
makes both of these spaces identical. That is, if there is no
change to the CTM between a call to <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a> and the
stroking operation, then one can just pass user-space values to
<a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a> and ignore this note.
</p>
<p>
As with the other stroke parameters, the current line width is
examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
construction.
</p>
<p>
The default line width value is 2.0.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>a line width
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_line_width ()">
<a name="cairo-get-line-width"></a><h3>cairo_get_line_width ()</h3>
<pre class="programlisting"><span class="returnvalue">double</span>              cairo_get_line_width                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
This function returns the current line width value exactly as set by
<a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>. Note that the value is unchanged even if
the CTM has changed between the calls to <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a> and
<a class="link" href="cairo-cairo-t.html#cairo-get-line-width" title="cairo_get_line_width ()"><code class="function">cairo_get_line_width()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current line width.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_miter_limit ()">
<a name="cairo-set-miter-limit"></a><h3>cairo_set_miter_limit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_miter_limit               (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> limit</code></em>);</pre>
<p>
Sets the current miter limit within the cairo context.
</p>
<p>
If the current line join style is set to <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>
(see <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>), the miter limit is used to determine
whether the lines should be joined with a bevel instead of a miter.
Cairo divides the length of the miter by the line width.
If the result is greater than the miter limit, the style is
converted to a bevel.
</p>
<p>
As with the other stroke parameters, the current line miter limit is
examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
construction.
</p>
<p>
The default miter limit value is 10.0, which will convert joins
with interior angles less than 11 degrees to bevels instead of
miters. For reference, a miter limit of 2.0 makes the miter cutoff
at 60 degrees, and a miter limit of 1.414 makes the cutoff at 90
degrees.
</p>
<p>
A miter limit for a desired angle can be computed as: miter limit =
1/sin(angle/2)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>limit</code></em> :</span></p></td>
<td>miter limit to set
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_miter_limit ()">
<a name="cairo-get-miter-limit"></a><h3>cairo_get_miter_limit ()</h3>
<pre class="programlisting"><span class="returnvalue">double</span>              cairo_get_miter_limit               (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current miter limit, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit" title="cairo_set_miter_limit ()"><code class="function">cairo_set_miter_limit()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current miter limit.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum cairo_operator_t">
<a name="cairo-operator-t"></a><h3>enum cairo_operator_t</h3>
<pre class="programlisting">typedef enum _cairo_operator {
    CAIRO_OPERATOR_CLEAR,

    CAIRO_OPERATOR_SOURCE,
    CAIRO_OPERATOR_OVER,
    CAIRO_OPERATOR_IN,
    CAIRO_OPERATOR_OUT,
    CAIRO_OPERATOR_ATOP,

    CAIRO_OPERATOR_DEST,
    CAIRO_OPERATOR_DEST_OVER,
    CAIRO_OPERATOR_DEST_IN,
    CAIRO_OPERATOR_DEST_OUT,
    CAIRO_OPERATOR_DEST_ATOP,

    CAIRO_OPERATOR_XOR,
    CAIRO_OPERATOR_ADD,
    CAIRO_OPERATOR_SATURATE,

    CAIRO_OPERATOR_MULTIPLY,
    CAIRO_OPERATOR_SCREEN,
    CAIRO_OPERATOR_OVERLAY,
    CAIRO_OPERATOR_DARKEN,
    CAIRO_OPERATOR_LIGHTEN,
    CAIRO_OPERATOR_COLOR_DODGE,
    CAIRO_OPERATOR_COLOR_BURN,
    CAIRO_OPERATOR_HARD_LIGHT,
    CAIRO_OPERATOR_SOFT_LIGHT,
    CAIRO_OPERATOR_DIFFERENCE,
    CAIRO_OPERATOR_EXCLUSION,
    CAIRO_OPERATOR_HSL_HUE,
    CAIRO_OPERATOR_HSL_SATURATION,
    CAIRO_OPERATOR_HSL_COLOR,
    CAIRO_OPERATOR_HSL_LUMINOSITY
} cairo_operator_t;
</pre>
<p>
<a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> is used to set the compositing operator for all cairo
drawing operations.
</p>
<p>
The default operator is <a class="link" href="cairo-cairo-t.html#CAIRO-OPERATOR-OVER:CAPS"><code class="literal">CAIRO_OPERATOR_OVER</code></a>.
</p>
<p>
The operators marked as <em class="firstterm">unbounded</em> modify their
destination even outside of the mask layer (that is, their effect is not
bound by the mask layer).  However, their effect can still be limited by
way of clipping.
</p>
<p>
To keep things simple, the operator descriptions here
document the behavior for when both source and destination are either fully
transparent or fully opaque.  The actual implementation works for
translucent layers too.
For a more detailed explanation of the effects of each operator, including
the mathematical definitions, see
<a class="ulink" href="http://cairographics.org/operators/" target="_top">http://cairographics.org/operators/</a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="CAIRO-OPERATOR-CLEAR:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_CLEAR</code></span></p></td>
<td>clear destination layer (bounded)
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-SOURCE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SOURCE</code></span></p></td>
<td>replace destination layer (bounded)
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-OVER:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_OVER</code></span></p></td>
<td>draw source layer on top of destination layer
(bounded)
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-IN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_IN</code></span></p></td>
<td>draw source where there was destination content
(unbounded)
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-OUT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_OUT</code></span></p></td>
<td>draw source where there was no destination
content (unbounded)
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-ATOP:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_ATOP</code></span></p></td>
<td>draw source on top of destination content and
only there
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-DEST:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST</code></span></p></td>
<td>ignore the source
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-DEST-OVER:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_OVER</code></span></p></td>
<td>draw destination on top of source
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-DEST-IN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_IN</code></span></p></td>
<td>leave destination only where there was
source content (unbounded)
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-DEST-OUT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_OUT</code></span></p></td>
<td>leave destination only where there was no
source content
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-DEST-ATOP:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_ATOP</code></span></p></td>
<td>leave destination on top of source content
and only there (unbounded)
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-XOR:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_XOR</code></span></p></td>
<td>source and destination are shown where there is only
one of them
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-ADD:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_ADD</code></span></p></td>
<td>source and destination layers are accumulated
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-SATURATE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SATURATE</code></span></p></td>
<td>like over, but assuming source and dest are
disjoint geometries
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-MULTIPLY:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_MULTIPLY</code></span></p></td>
<td>source and destination layers are multiplied.
This causes the result to be at least as dark as the darker inputs.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-SCREEN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SCREEN</code></span></p></td>
<td>source and destination are complemented and
multiplied. This causes the result to be at least as light as the lighter
inputs.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-OVERLAY:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_OVERLAY</code></span></p></td>
<td>multiplies or screens, depending on the
lightness of the destination color.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-DARKEN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DARKEN</code></span></p></td>
<td>replaces the destination with the source if it
is darker, otherwise keeps the source.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-LIGHTEN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_LIGHTEN</code></span></p></td>
<td>replaces the destination with the source if it
is lighter, otherwise keeps the source.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-COLOR-DODGE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_COLOR_DODGE</code></span></p></td>
<td>brightens the destination color to reflect
the source color.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-COLOR-BURN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_COLOR_BURN</code></span></p></td>
<td>darkens the destination color to reflect
the source color.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-HARD-LIGHT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HARD_LIGHT</code></span></p></td>
<td>Multiplies or screens, dependant on source
color.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-SOFT-LIGHT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SOFT_LIGHT</code></span></p></td>
<td>Darkens or lightens, dependant on source
color.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-DIFFERENCE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DIFFERENCE</code></span></p></td>
<td>Takes the difference of the source and
destination color.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-EXCLUSION:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_EXCLUSION</code></span></p></td>
<td>Produces an effect similar to difference, but
with lower contrast.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-HSL-HUE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HSL_HUE</code></span></p></td>
<td>Creates a color with the hue of the source
and the saturation and luminosity of the target.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-HSL-SATURATION:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HSL_SATURATION</code></span></p></td>
<td>Creates a color with the saturation
of the source and the hue and luminosity of the target. Painting with
this mode onto a gray area prduces no change.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-HSL-COLOR:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HSL_COLOR</code></span></p></td>
<td>Creates a color with the hue and saturation
of the source and the luminosity of the target. This preserves the gray
levels of the target and is useful for coloring monochrome images or
tinting color images.
</td>
</tr>
<tr>
<td><p><a name="CAIRO-OPERATOR-HSL-LUMINOSITY:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HSL_LUMINOSITY</code></span></p></td>
<td>Creates a color with the luminosity of
the source and the hue and saturation of the target. This produces an
inverse effect to <em class="parameter"><code>CAIRO_OPERATOR_HSL_COLOR</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_operator ()">
<a name="cairo-set-operator"></a><h3>cairo_set_operator ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_operator                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> op</code></em>);</pre>
<p>
Sets the compositing operator to be used for all drawing
operations. See <a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> for details on the semantics of
each available compositing operator.
</p>
<p>
The default operator is <a class="link" href="cairo-cairo-t.html#CAIRO-OPERATOR-OVER:CAPS"><code class="literal">CAIRO_OPERATOR_OVER</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
<td>a compositing operator, specified as a <a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_operator ()">
<a name="cairo-get-operator"></a><h3>cairo_get_operator ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="returnvalue">cairo_operator_t</span></a>    cairo_get_operator                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current compositing operator for a cairo context.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current compositing operator.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_set_tolerance ()">
<a name="cairo-set-tolerance"></a><h3>cairo_set_tolerance ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_set_tolerance                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> tolerance</code></em>);</pre>
<p>
Sets the tolerance used when converting paths into trapezoids.
Curved segments of the path will be subdivided until the maximum
deviation between the original path and the polygonal approximation
is less than <em class="parameter"><code>tolerance</code></em>. The default value is 0.1. A larger
value will give better performance, a smaller value, better
appearance. (Reducing the value from the default value of 0.1
is unlikely to improve appearance significantly.)  The accuracy of paths
within Cairo is limited by the precision of its internal arithmetic, and
the prescribed <em class="parameter"><code>tolerance</code></em> is restricted to the smallest
representable internal value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tolerance</code></em> :</span></p></td>
<td>the tolerance, in device units (typically pixels)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_tolerance ()">
<a name="cairo-get-tolerance"></a><h3>cairo_get_tolerance ()</h3>
<pre class="programlisting"><span class="returnvalue">double</span>              cairo_get_tolerance                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current tolerance value, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-tolerance" title="cairo_set_tolerance ()"><code class="function">cairo_set_tolerance()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current tolerance value.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_clip ()">
<a name="cairo-clip"></a><h3>cairo_clip ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_clip                          (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Establishes a new clip region by intersecting the current clip
region with the current path as it would be filled by <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>
and according to the current fill rule (see <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a>).
</p>
<p>
After <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>, the current path will be cleared from the cairo
context.
</p>
<p>
The current clip region affects all drawing operations by
effectively masking out any changes to the surface that are outside
the current clip region.
</p>
<p>
Calling <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> can only make the clip region smaller, never
larger. But the current clip is part of the graphics state, so a
temporary restriction of the clip region can be achieved by
calling <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> within a <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>/<a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>
pair. The only other means of increasing the size of the clip
region is <a class="link" href="cairo-cairo-t.html#cairo-reset-clip" title="cairo_reset_clip ()"><code class="function">cairo_reset_clip()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_clip_preserve ()">
<a name="cairo-clip-preserve"></a><h3>cairo_clip_preserve ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_clip_preserve                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Establishes a new clip region by intersecting the current clip
region with the current path as it would be filled by <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>
and according to the current fill rule (see <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a>).
</p>
<p>
Unlike <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()"><code class="function">cairo_clip_preserve()</code></a> preserves the path within
the cairo context.
</p>
<p>
The current clip region affects all drawing operations by
effectively masking out any changes to the surface that are outside
the current clip region.
</p>
<p>
Calling <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()"><code class="function">cairo_clip_preserve()</code></a> can only make the clip region smaller, never
larger. But the current clip is part of the graphics state, so a
temporary restriction of the clip region can be achieved by
calling <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()"><code class="function">cairo_clip_preserve()</code></a> within a <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>/<a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>
pair. The only other means of increasing the size of the clip
region is <a class="link" href="cairo-cairo-t.html#cairo-reset-clip" title="cairo_reset_clip ()"><code class="function">cairo_reset_clip()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_clip_extents ()">
<a name="cairo-clip-extents"></a><h3>cairo_clip_extents ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_clip_extents                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x2</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y2</code></em>);</pre>
<p>
Computes a bounding box in user coordinates covering the area inside the
current clip.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
<td>left of the resulting extents
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
<td>top of the resulting extents
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
<td>right of the resulting extents
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
<td>bottom of the resulting extents
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" title="cairo_in_clip ()">
<a name="cairo-in-clip"></a><h3>cairo_in_clip ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a>        cairo_in_clip                       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
<p>
Tests whether the given point is inside the area that would be
visible through the current clip, i.e. the area that would be filled by
a <a class="link" href="cairo-cairo-t.html#cairo-paint" title="cairo_paint ()"><code class="function">cairo_paint()</code></a> operation.
</p>
<p>
See <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>, and <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()"><code class="function">cairo_clip_preserve()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X coordinate of the point to test
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y coordinate of the point to test
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A non-zero value if the point is inside, or zero if
outside.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.10</p>
</div>
<hr>
<div class="refsect2" title="cairo_reset_clip ()">
<a name="cairo-reset-clip"></a><h3>cairo_reset_clip ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_reset_clip                    (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Reset the current clip region to its original, unrestricted
state. That is, set the clip region to an infinitely large shape
containing the target surface. Equivalently, if infinity is too
hard to grasp, one can imagine the clip region being reset to the
exact bounds of the target surface.
</p>
<p>
Note that code meant to be reusable should not call
<a class="link" href="cairo-cairo-t.html#cairo-reset-clip" title="cairo_reset_clip ()"><code class="function">cairo_reset_clip()</code></a> as it will cause results unexpected by
higher-level code which calls <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>. Consider using
<a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> around <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> as a more
robust means of temporarily restricting the clip region.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_rectangle_t">
<a name="cairo-rectangle-t"></a><h3>cairo_rectangle_t</h3>
<pre class="programlisting">typedef struct {
    double x, y, width, height;
} cairo_rectangle_t;
</pre>
<p>
A data structure for holding a rectangle.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-rectangle-t.x"></a>x</code></em>;</span></p></td>
<td>X coordinate of the left side of the rectangle
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-rectangle-t.y"></a>y</code></em>;</span></p></td>
<td>Y coordinate of the the top side of the rectangle
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-rectangle-t.width"></a>width</code></em>;</span></p></td>
<td>width of the rectangle
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-rectangle-t.height"></a>height</code></em>;</span></p></td>
<td>height of the rectangle
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" title="cairo_rectangle_list_t">
<a name="cairo-rectangle-list-t"></a><h3>cairo_rectangle_list_t</h3>
<pre class="programlisting">typedef struct {
    cairo_status_t     status;
    cairo_rectangle_t *rectangles;
    int                num_rectangles;
} cairo_rectangle_list_t;
</pre>
<p>
A data structure for holding a dynamically allocated
array of rectangles.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a> <em class="structfield"><code><a name="cairo-rectangle-list-t.status"></a>status</code></em>;</span></p></td>
<td>Error status of the rectangle list
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="cairo-cairo-t.html#cairo-rectangle-t" title="cairo_rectangle_t"><span class="type">cairo_rectangle_t</span></a> *<em class="structfield"><code><a name="cairo-rectangle-list-t.rectangles"></a>rectangles</code></em>;</span></p></td>
<td>Array containing the rectangles
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="cairo-rectangle-list-t.num-rectangles"></a>num_rectangles</code></em>;</span></p></td>
<td>Number of rectangles in this list
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" title="cairo_rectangle_list_destroy ()">
<a name="cairo-rectangle-list-destroy"></a><h3>cairo_rectangle_list_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_rectangle_list_destroy        (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t"><span class="type">cairo_rectangle_list_t</span></a> *rectangle_list</code></em>);</pre>
<p>
Unconditionally frees <em class="parameter"><code>rectangle_list</code></em> and all associated
references. After this call, the <em class="parameter"><code>rectangle_list</code></em> pointer must not
be dereferenced.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>rectangle_list</code></em> :</span></p></td>
<td>a rectangle list, as obtained from <code class="function">cairo_copy_clip_rectangles()</code>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" title="cairo_copy_clip_rectangle_list ()">
<a name="cairo-copy-clip-rectangle-list"></a><h3>cairo_copy_clip_rectangle_list ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t"><span class="returnvalue">cairo_rectangle_list_t</span></a> * cairo_copy_clip_rectangle_list (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Gets the current clip region as a list of rectangles in user coordinates.
Never returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<p>
The status in the list may be <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-CLIP-NOT-REPRESENTABLE:CAPS"><code class="literal">CAIRO_STATUS_CLIP_NOT_REPRESENTABLE</code></a> to
indicate that the clip region cannot be represented as a list of
user-space rectangles. The status may have other values to indicate
other errors.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current clip region as a list of rectangles in user coordinates,
which should be destroyed using <a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-destroy" title="cairo_rectangle_list_destroy ()"><code class="function">cairo_rectangle_list_destroy()</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" title="cairo_fill ()">
<a name="cairo-fill"></a><h3>cairo_fill ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_fill                          (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
A drawing operator that fills the current path according to the
current fill rule, (each sub-path is implicitly closed before being
filled). After <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, the current path will be cleared from
the cairo context. See <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and
<a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_fill_preserve ()">
<a name="cairo-fill-preserve"></a><h3>cairo_fill_preserve ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_fill_preserve                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
A drawing operator that fills the current path according to the
current fill rule, (each sub-path is implicitly closed before being
filled). Unlike <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a> preserves the
path within the cairo context.
</p>
<p>
See <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_fill_extents ()">
<a name="cairo-fill-extents"></a><h3>cairo_fill_extents ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_fill_extents                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x2</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y2</code></em>);</pre>
<p>
Computes a bounding box in user coordinates covering the area that
would be affected, (the "inked" area), by a <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> operation
given the current path and fill parameters. If the current path is
empty, returns an empty rectangle ((0,0), (0,0)). Surface
dimensions and clipping are not taken into account.
</p>
<p>
Contrast with <a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a>, which is similar, but returns
non-zero extents for some paths with no inked area, (such as a
simple line segment).
</p>
<p>
Note that <a class="link" href="cairo-cairo-t.html#cairo-fill-extents" title="cairo_fill_extents ()"><code class="function">cairo_fill_extents()</code></a> must necessarily do more work to
compute the precise inked areas in light of the fill rule, so
<a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> may be more desirable for sake of performance
if the non-inked path extents are desired.
</p>
<p>
See <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
<td>left of the resulting extents
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
<td>top of the resulting extents
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
<td>right of the resulting extents
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
<td>bottom of the resulting extents
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_in_fill ()">
<a name="cairo-in-fill"></a><h3>cairo_in_fill ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a>        cairo_in_fill                       (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
<p>
Tests whether the given point is inside the area that would be
affected by a <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> operation given the current path and
filling parameters. Surface dimensions and clipping are not taken
into account.
</p>
<p>
See <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X coordinate of the point to test
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y coordinate of the point to test
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A non-zero value if the point is inside, or zero if
outside.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_mask ()">
<a name="cairo-mask"></a><h3>cairo_mask ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_mask                          (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre>
<p>
A drawing operator that paints the current source
using the alpha channel of <em class="parameter"><code>pattern</code></em> as a mask. (Opaque
areas of <em class="parameter"><code>pattern</code></em> are painted with the source, transparent
areas are not painted.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_mask_surface ()">
<a name="cairo-mask-surface"></a><h3>cairo_mask_surface ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_mask_surface                  (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> surface_x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> surface_y</code></em>);</pre>
<p>
A drawing operator that paints the current source
using the alpha channel of <em class="parameter"><code>surface</code></em> as a mask. (Opaque
areas of <em class="parameter"><code>surface</code></em> are painted with the source, transparent
areas are not painted.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>surface_x</code></em> :</span></p></td>
<td>X coordinate at which to place the origin of <em class="parameter"><code>surface</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>surface_y</code></em> :</span></p></td>
<td>Y coordinate at which to place the origin of <em class="parameter"><code>surface</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_paint ()">
<a name="cairo-paint"></a><h3>cairo_paint ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_paint                         (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
A drawing operator that paints the current source everywhere within
the current clip region.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_paint_with_alpha ()">
<a name="cairo-paint-with-alpha"></a><h3>cairo_paint_with_alpha ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_paint_with_alpha              (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> alpha</code></em>);</pre>
<p>
A drawing operator that paints the current source everywhere within
the current clip region using a mask of constant alpha value
<em class="parameter"><code>alpha</code></em>. The effect is similar to <a class="link" href="cairo-cairo-t.html#cairo-paint" title="cairo_paint ()"><code class="function">cairo_paint()</code></a>, but the drawing
is faded out using the alpha value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
<td>alpha value, between 0 (transparent) and 1 (opaque)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_stroke ()">
<a name="cairo-stroke"></a><h3>cairo_stroke ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_stroke                        (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
A drawing operator that strokes the current path according to the
current line width, line join, line cap, and dash settings. After
<a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, the current path will be cleared from the cairo
context. See <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
<a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
<a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.
</p>
<p>
Note: Degenerate segments and sub-paths are treated specially and
provide a useful result. These can result in two different
situations:
</p>
<p>
1. Zero-length "on" segments set in <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>. If the cap
style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> or <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> then these
segments will be drawn as circular dots or squares respectively. In
the case of <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a>, the orientation of the squares
is determined by the direction of the underlying path.
</p>
<p>
2. A sub-path created by <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a> followed by either a
<a class="link" href="cairo-Paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a> or one or more calls to <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a> to the
same coordinate as the <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>. If the cap style is
<a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> then these sub-paths will be drawn as circular
dots. Note that in the case of <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> a degenerate
sub-path will not be drawn at all, (since the correct orientation
is indeterminate).
</p>
<p>
In no case will a cap style of <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a> cause anything
to be drawn in the case of either degenerate segments or sub-paths.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_stroke_preserve ()">
<a name="cairo-stroke-preserve"></a><h3>cairo_stroke_preserve ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_stroke_preserve               (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
A drawing operator that strokes the current path according to the
current line width, line join, line cap, and dash settings. Unlike
<a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a> preserves the path within the
cairo context.
</p>
<p>
See <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
<a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
<a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_stroke_extents ()">
<a name="cairo-stroke-extents"></a><h3>cairo_stroke_extents ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_stroke_extents                (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y1</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *x2</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> *y2</code></em>);</pre>
<p>
Computes a bounding box in user coordinates covering the area that
would be affected, (the "inked" area), by a <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>
operation given the current path and stroke parameters.
If the current path is empty, returns an empty rectangle ((0,0), (0,0)).
Surface dimensions and clipping are not taken into account.
</p>
<p>
Note that if the line width is set to exactly zero, then
<a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> will return an empty rectangle. Contrast with
<a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> which can be used to compute the non-empty
bounds as the line width approaches zero.
</p>
<p>
Note that <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> must necessarily do more work to
compute the precise inked areas in light of the stroke parameters,
so <a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> may be more desirable for sake of
performance if non-inked path extents are desired.
</p>
<p>
See <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
<a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
<a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
<td>left of the resulting extents
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
<td>top of the resulting extents
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
<td>right of the resulting extents
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
<td>bottom of the resulting extents
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_in_stroke ()">
<a name="cairo-in-stroke"></a><h3>cairo_in_stroke ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a>        cairo_in_stroke                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
<p>
Tests whether the given point is inside the area that would be
affected by a <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a> operation given the current path and
stroking parameters. Surface dimensions and clipping are not taken
into account.
</p>
<p>
See <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
<a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
<a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X coordinate of the point to test
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y coordinate of the point to test
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A non-zero value if the point is inside, or zero if
outside.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_copy_page ()">
<a name="cairo-copy-page"></a><h3>cairo_copy_page ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_copy_page                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Emits the current page for backends that support multiple pages, but
doesn't clear it, so, the contents of the current page will be retained
for the next page too.  Use <a class="link" href="cairo-cairo-t.html#cairo-show-page" title="cairo_show_page ()"><code class="function">cairo_show_page()</code></a> if you want to get an
empty page after the emission.
</p>
<p>
This is a convenience function that simply calls
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-copy-page" title="cairo_surface_copy_page ()"><code class="function">cairo_surface_copy_page()</code></a> on <em class="parameter"><code>cr</code></em>'s target.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_show_page ()">
<a name="cairo-show-page"></a><h3>cairo_show_page ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cairo_show_page                     (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Emits and clears the current page for backends that support multiple
pages.  Use <a class="link" href="cairo-cairo-t.html#cairo-copy-page" title="cairo_copy_page ()"><code class="function">cairo_copy_page()</code></a> if you don't want to clear the page.
</p>
<p>
This is a convenience function that simply calls
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-show-page" title="cairo_surface_show_page ()"><code class="function">cairo_surface_show_page()</code></a> on <em class="parameter"><code>cr</code></em>'s target.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a cairo context
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="cairo_get_reference_count ()">
<a name="cairo-get-reference-count"></a><h3>cairo_get_reference_count ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span>        cairo_get_reference_count           (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
<p>
Returns the current reference count of <em class="parameter"><code>cr</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the current reference count of <em class="parameter"><code>cr</code></em>.  If the
object is a nil object, 0 will be returned.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" title="cairo_set_user_data ()">
<a name="cairo-set-user-data"></a><h3>cairo_set_user_data ()</h3>
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>      cairo_set_user_data                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> destroy</code></em>);</pre>
<p>
Attach user data to <em class="parameter"><code>cr</code></em>.  To remove user data from a surface,
call this function with the key that was used to set it and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
for <em class="parameter"><code>data</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>the address of a <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> to attach the user data to
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>the user data to attach to the <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> which will be called when the
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is destroyed or when new user data is attached using the
same key.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a
slot could not be allocated for the user data.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2" title="cairo_get_user_data ()">
<a name="cairo-get-user-data"></a><h3>cairo_get_user_data ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> *              cairo_get_user_data                 (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>);</pre>
<p>
Return user data previously attached to <em class="parameter"><code>cr</code></em> using the specified
key.  If no user data has been attached with the given key this
function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>the address of the <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> the user data was
attached to
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the user data previously attached or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
</div>
<div class="refsect1" title="See Also">
<a name="cairo-cairo-t.see-also"></a><h2>See Also</h2>
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15</div>
</body>
</html>